#ifndef _HD_IF_H_
#define _HD_IF_H_
#include "data_type.h"

extern void delay_ms(uInt16 ms );


extern void chip_install (uInt8 chip_id);

extern void chip_uninstall(uInt8 chip_id);


extern void hardware_rest(void);


extern void Init_Device (void);


extern void SpiWriteByte( uInt8 ch,uInt8 chip_id );

extern uInt8 SpiReadByte(uInt8 chip_id);

extern void write_reg(UINT8 *dat,UINT8 size,UINT8 chip_id);

extern void read_reg(UINT8 *value,UINT8  n,UINT8 chip_id);



extern void WriteRegister(uInt8 chip_id,uInt8 channel_id, uInt8 address, uInt8 Data);
extern uInt8 ReadRegister(uInt8 chip_id,uInt8 channel_id,uInt8 address) ;

extern int32 ReadRAM(UINT8 chip_id,uInt8 channel_id, uInt16 address);


extern void WriteRAM(uInt8 chip_id, uInt8 channel_id, uInt16 address, uInt32 dat);

extern void setUserMode (uInt8 chip_id,uInt8 channel_id,uInt8 on);

extern char _getkey (void);

//extern char _getstring();

extern void compear_string(void);

extern void qx34132_read_linefeed_status(uInt8 chip_id);

extern void qx34132_read_hook_status(uInt8 chip_id);

extern void qx34132_DTMF_DET(uInt8 chip_id);

extern void uart_cmd_init(void);


#endif
